package com.bootdo.hjh.dao;

import com.bootdo.hjh.dao.provider.OrderProvider;
import com.bootdo.hjh.domain.OrderDO;
import com.bootdo.hjh.domain.WithdrawDO;
import com.bootdo.hjh.domain.WithdrawDOExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

public interface WithdrawDOMapper {
    int countByExample(WithdrawDOExample example);

    int deleteByExample(WithdrawDOExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(WithdrawDO record);

    int insertSelective(WithdrawDO record);

    List<WithdrawDO> selectByExampleWithRowbounds(WithdrawDOExample example, RowBounds rowBounds);

    List<WithdrawDO> selectByExample(WithdrawDOExample example);

    WithdrawDO selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") WithdrawDO record, @Param("example") WithdrawDOExample example);

    int updateByExample(@Param("record") WithdrawDO record, @Param("example") WithdrawDOExample example);

    int updateByPrimaryKeySelective(WithdrawDO record);

    int updateByPrimaryKey(WithdrawDO record);

    Long sumByExample(WithdrawDOExample example);

    void batchInsert(@Param("items") List<WithdrawDO> items);

    @SelectProvider(type=OrderProvider.class,method ="queryWithdraw")
    List<WithdrawDO> queryWithdraw(@Param("offset") Integer offset, @Param("limit") Integer limit, @Param("status") Integer status, @Param("userId") Long userId);

    @SelectProvider(type=OrderProvider.class,method ="countWithdraw")
    int countWithdraw(@Param("status") Integer status,@Param("userId") Long userId);

    @UpdateProvider(type=OrderProvider.class,method = "updateWithdrawStatus")
    int updateStatus(@Param("id") Integer id, @Param("status") Integer status);
}